import * as api from '.';

const companyApi = {

  find: async (id: string) => {
    return api.GET('/api/company/find/:id', { id }, null);
  },

  query: async (keyword: string, cityId: string, active: string, owner: string, pageNumber: number, pageSize: number) => {
    const data = {
      keyword,
      cityId,
      active,
      owner,
      pageNumber,
      pageSize
    };
    return api.GET('/api/company/query', null, data);
  },

  save: async (data: any) => {
    return api.POST('/api/company/save', null, data);
  },

  delete: async (id: string) => {
    return api.DELETE('/api/company/delete/:id', { id }, null);
  }

};

export default companyApi;
